export const constRoutes = [
  {
    name: 'layout',
    path: '/',
    component: () => import('@/layout/index.vue'),
    redirect: '/home',
    meta: {
      title: '',
      hidden: false, //路由是否隐藏
      icon: ''
    },
    children: [
      {
        name: 'home',
        path: '/home',
        component: () => import('@/views/home/index.vue'),
        meta: {
          title: '首页',
          hidden: false, //路由是否隐藏
          icon: 'House'
        }
      },
      {
        name: 'overview',
        path: '/overview',
        component: () => import('@/views/overview/index.vue'),
        meta: {
          title: '系统概览',
          hidden: false, //路由是否隐藏
          icon: 'Document'
        }
      },
      {
        name: 'file',
        path: '/file',
        component: () => import('@/views/file/index.vue'),
        meta: {
          title: '合同管理',
          hidden: false, //路由是否隐藏
          icon: 'Files'
        }
      },
      {
        name: 'operationLog',
        path: '/operationLog',
        component: () => import('@/views/operationLog/index.vue'),
        meta: {
          title: '操作日志',
          hidden: false, //路由是否隐藏
          icon: 'DocumentCopy'
        }
      },
      {
        name: 'loginLog',
        path: '/loginLog',
        component: () => import('@/views/loginLog/index.vue'),
        meta: {
          title: '登录日志',
          hidden: false, //路由是否隐藏
          icon: 'Notebook'
        }
      },
      {
        name: 'systemSetting',
        path: '/systemSetting',
        component: () => import('@/views/systemSetting/index.vue'),
        meta: {
          title: '系统设置',
          hidden: false, //路由是否隐藏
          icon: 'Setting'
        }
      }
    ]
  },
  {
    name: 'login',
    path: '/login',
    component: () => import('@/views/login/index.vue'),
    meta: {
      title: '登录',
      hidden: true, //路由是否隐藏
      icon: ''
    }
  },
  {
    path: '/404',
    component: () => import('@/views/404/index.vue'),
    name: '404',
    meta: {
      title: '404', // 菜单标题
      hidden: true //路由是否隐藏
    }
  }
]

export const asyncRoutes = [
  {
    name: 'user',
    path: '/user',
    component: () => import('@/layout/index.vue'),
    redirect: '/user/product',
    meta: {
      title: '用户管理',
      hidden: false, //路由是否隐藏
      icon: 'User'
    },
    children: [
      {
        name: 'adminProduct',
        path: '/user/product',
        component: () => import('@/views/user/product/index.vue'),
        meta: {
          group: '管理员管理',
          title: '产品管理员',
          hidden: false, //路由是否隐藏
          icon: ''
        }
      },
      {
        name: 'adminUser',
        path: '/user/adminUser',
        component: () => import('@/views/user/adminUser/index.vue'),
        meta: {
          title: '用户管理员',
          hidden: false, //路由是否隐藏
          icon: ''
        }
      },
      {
        name: 'message',
        path: '/user/message',
        component: () => import('@/views/user/message/index.vue'),
        meta: {
          title: '消息管理员',
          hidden: false, //路由是否隐藏
          icon: ''
        }
      },
      {
        name: 'userList',
        path: '/user/userList',
        component: () => import('@/views/user/userList/index.vue'),
        meta: {
          group: '员工管理',
          title: '用户列表',
          hidden: false, //路由是否隐藏
          icon: ''
        }
      }
    ]
  },
  {
    name: 'product',
    path: '/product',
    component: () => import('@/layout/index.vue'),
    redirect: '/product/productList',
    meta: {
      title: '产品管理',
      hidden: false, //路由是否隐藏
      icon: 'TakeawayBox'
    },
    children: [
      {
        name: 'productList',
        path: '/product/productList',
        component: () => import('@/views/product/productList/index.vue'),
        meta: {
          group: '入库管理',
          title: '产品列表',
          hidden: false, //路由是否隐藏
          icon: ''
        }
      },
      {
        name: 'outList',
        path: '/product/outList',
        component: () => import('@/views/product/outList/index.vue'),
        meta: {
          group: '出库管理',
          title: '出库列表',
          hidden: false, //路由是否隐藏
          icon: ''
        }
      }
    ]
  },
  {
    name: 'adminMessage',
    path: '/adminMessage',
    component: () => import('@/layout/index.vue'),
    redirect: '/adminMessage/messageList',
    meta: {
      title: '消息管理',
      hidden: false, //路由是否隐藏
      icon: 'ChatSquare'
    },
    children: [
      {
        name: 'messageList',
        path: '/adminMessage/messageList',
        component: () => import('@/views/adminMessage/messageList/index.vue'),
        meta: {
          group: '消息管理',
          title: '消息列表',
          hidden: false, //路由是否隐藏
          icon: ''
        }
      },
      {
        name: 'recycle',
        path: '/adminMessage/recycle',
        component: () => import('@/views/adminMessage/recycle/index.vue'),
        meta: {
          group: '回收站',
          title: '回收站',
          hidden: false, //路由是否隐藏
          icon: ''
        }
      }
    ]
  }
]

export const anyRoute = {
  path: '/:pathMatch(.*)*',
  redirect: '/404',
  name: 'any',
  meta: {
    title: '任意路由', // 菜单标题
    hidden: true //路由是否隐藏
  }
}
